#ifndef LUA_BASE_HPP
#define LUA_BASE_HPP

#include "utils/singleton.hpp"

struct lua_State;

class LuaShared final : PublicSingleton<LuaShared>
{
    SINGLETON_TYPE();

public:
    static lua_State *NewState();
    static int CloseState(lua_State *state);
private:
    LuaShared();
    ~LuaShared();

    lua_State *global_;
};

class LuaScriptBase {
protected:
    LuaScriptBase();
    ~LuaScriptBase();

    lua_State *l_;
};

#endif /* LUA_BASE_HPP */
